package com.aluem.mydataxwebexecutor.Controller;

import com.aluem.mydataxwebexecutor.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/zrb")
public class TestController {

    @Autowired
    private TestService testService;

    //获取json字符串写入文件等待datax执行
    @PostMapping("/test3/{tableName}")
    public String test3(@PathVariable("tableName") String tableName, @RequestBody String jsonString) {
        System.out.println(tableName);
        testService.writeJson(jsonString);
        return jsonString;
    }

}
